import React, {Component} from "react";
import {observer, inject} from "mobx-react";
import './index.scss';
import {Button} from 'antd';
import Header from 'Components/layout/header';
import Footer from 'Components/layout/footer';
import Breadcrumb from 'Components/layout/breadcrumb';
import {toJS} from "mobx";

@inject('Store')
@observer
export default class Index extends Component {
	constructor(props) {
		super(props);
		this.state = {
			title: 'home',
			buttonName: 'gotopage1',
		};
	}
	UNSAFE_componentWillMount(){
		console.log(this.props, 'props');
	}
	render() {
		return (
			<div className="home_container">
				<Header 
					history={this.props.history}
					module={this.props.Store.Layout.currentMode}
					menus={toJS(this.props.Store.Layout.menuData)}
					layoutConfig={this.props.Store.Layout.layoutConfig}
					baseInfo={this.props.Store.Tenant.baseInfo}
				/>
				<Breadcrumb></Breadcrumb>
				<div className="home_container-banner">
					<img src={require('../../assets/banner01_bg.png')} alt="" />
				</div>
				<Button onClick={() => this.props.history.push({pathname: '/login'})}>{this.state.buttonName}</Button>
				<Footer></Footer>
			</div>
		);     
	}
}
